-- GENERATED SPELL FOR [Shadowforge Peasant] --


function spell0_8896(pUnit, Event) --@Disarm,n/a--
pUnit:FullCastSpellOnTarget(6713,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8896', 5320, 1)
end

function spell1_8896(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(9053,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8896', 3000, 1)
end

function spell2_8896(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(11642,pUnit)
pUnit:RegisterEvent('Sorts_8896', 3500, 1)
end

function spell3_8896(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8896', 573, 1)
end

function spell4_8896(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(13584,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8896', 573, 1)
end

function spell5_8896(pUnit, Event) --@Tendon Rip,n/a--
pUnit:FullCastSpellOnTarget(3604,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8896', 8000, 1)
end

function spell6_8896(pUnit, Event) --@Throw Dynamite,n/a--
pUnit:FullCastSpellOnTarget(7978,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8896', 1000, 1)
end

function Sorts_8896(pUnit, Event)
local choix_sorts_8896 = math.random(0, 6)
if choix_sorts_8896 == 0 then
pUnit:RegisterEvent('spell0_8896', 1, 1)
end
if choix_sorts_8896 == 1 then
pUnit:RegisterEvent('spell1_8896', 1, 1)
end
if choix_sorts_8896 == 2 then
pUnit:RegisterEvent('spell2_8896', 1, 1)
end
if choix_sorts_8896 == 3 then
pUnit:RegisterEvent('spell3_8896', 1, 1)
end
if choix_sorts_8896 == 4 then
pUnit:RegisterEvent('spell4_8896', 1, 1)
end
if choix_sorts_8896 == 5 then
pUnit:RegisterEvent('spell5_8896', 1, 1)
end
if choix_sorts_8896 == 6 then
pUnit:RegisterEvent('spell6_8896', 1, 1)
end
end

function mob8896_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8896', math.random(1500, 3000), 1)
end

function mob8896_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8896_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8896_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8896, 1, 'mob8896_Action')
RegisterUnitEvent(8896, 2, 'mob8896_Leave')
RegisterUnitEvent(8896, 3, 'mob8896_Kill')
RegisterUnitEvent(8896, 4, 'mob8896_Die')
